-- GENERATED SPELL FOR [Socrethar] --


function spell0_20132(pUnit, Event) --@Anti-Magic Shield,n/a--
pUnit:FullCastSpellOnTarget(37538,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 10000, 1)
end

function spell1_20132(pUnit, Event) --@Backlash,n/a--
pUnit:FullCastSpellOnTarget(37537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 573, 1)
end

function spell2_20132(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 621, 1)
end

function spell3_20132(pUnit, Event) --@Fireball Barrage,n/a--
pUnit:FullCastSpellOnTarget(37540,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 10000, 1)
end

function spell4_20132(pUnit, Event) --@Nether Protection,n/a--
pUnit:FullCastSpellOnTarget(37539,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 542, 1)
end

function spell5_20132(pUnit, Event) --@Power of the Legion,n/a--
pUnit:FullCastSpellOnTarget(35596,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 1000, 1)
end

function spell6_20132(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(28448,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 3000, 1)
end

function spell7_20132(pUnit, Event) --@Wrath of Socrethar,n/a--
pUnit:FullCastSpellOnTarget(35598,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 1500, 1)
end

function spell8_20132(pUnit, Event) --@Wrath of Socrethar,n/a--
pUnit:FullCastSpellOnTarget(35600,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20132', 1500, 1)
end

function Sorts_20132(pUnit, Event)
local choix_sorts_20132 = math.random(0, 8)
if choix_sorts_20132 == 0 then
pUnit:RegisterEvent('spell0_20132', 1, 1)
end
if choix_sorts_20132 == 1 then
pUnit:RegisterEvent('spell1_20132', 1, 1)
end
if choix_sorts_20132 == 2 then
pUnit:RegisterEvent('spell2_20132', 1, 1)
end
if choix_sorts_20132 == 3 then
pUnit:RegisterEvent('spell3_20132', 1, 1)
end
if choix_sorts_20132 == 4 then
pUnit:RegisterEvent('spell4_20132', 1, 1)
end
if choix_sorts_20132 == 5 then
pUnit:RegisterEvent('spell5_20132', 1, 1)
end
if choix_sorts_20132 == 6 then
pUnit:RegisterEvent('spell6_20132', 1, 1)
end
if choix_sorts_20132 == 7 then
pUnit:RegisterEvent('spell7_20132', 1, 1)
end
if choix_sorts_20132 == 8 then
pUnit:RegisterEvent('spell8_20132', 1, 1)
end
end

function mob20132_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20132', math.random(1500, 3000), 1)
end

function mob20132_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20132_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20132_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20132, 1, 'mob20132_Action')
RegisterUnitEvent(20132, 2, 'mob20132_Leave')
RegisterUnitEvent(20132, 3, 'mob20132_Kill')
RegisterUnitEvent(20132, 4, 'mob20132_Die')
